<?php
namespace app\demo\controller;

use app\BaseController;
use app\common\business\Admin;

class Data extends BaseController {
    public function index() {
        $roleId = $this->request->param('roleId', 0, 'intval');
        if (empty($roleId)){
            return show(config('status.error'), '参数错误');
        }
        $admin = new Admin();
        $results = $admin->getAdminByRoleId($roleId,5);
        return show(config('status.success'), 'ok', $results);
    }
}